#lang racket

(cons 'Earch empty)
(cons 'Earch (cons 'Venus (cons 'Mercury empty)))

(define tbl 
 (cons 0
  (cons 1
   (cons 2
    (cons 3
     (cons 4
      (cons 5
       (cons 6
        (cons 7
         (cons 8
          (cons 9 empty))))))))))
  )

(cons 1
 (cons 2 
   (cons true empty)))

(define lst
  (cons 0
    (cons 1
      (cons 2 empty)))
  )

; Test
(empty? (rest lst))
(empty? (rest (rest lst)))
(empty? (rest (rest (rest lst))))

(define (add-up-list list)
  (cond
    [(empty? (rest list)) (first list)]
    [else (+ (first list) (add-up-list (rest list)))]
    )
  )

(define (add-up-list2 a-list)
  (cond
    [(empty? a-list) 0]
    [else (+ (first a-list) (add-up-list2 (rest a-list)))]
    )
  )

(add-up-list lst)
(add-up-list tbl)
(add-up-list (cons 10 empty))
(add-up-list2 tbl)
